Optimal. Leaf size=95 \[ \frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{e \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}-a b e x+\frac{b^2 e \log \left ((c+d x)^2+1\right )}{2 d}-\frac{b^2 e (c+d x) \tan ^{-1}(c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.119431, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5043, 12, 4852, 4916, 4846, 260, 4884} \[ \frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{e \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}-a b e x+\frac{b^2 e \log \left ((c+d x)^2+1\right )}{2 d}-\frac{b^2 e (c+d x) \tan ^{-1}(c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5043
Rule 12
Rule 4852
Rule 4916
Rule 4846
Rule 260
Rule 4884
Rubi steps
\begin{align*} \int (c e+d e x) \left (a+b \tan ^{-1}(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int e x \left (a+b \tan ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac{e \operatorname{Subst}\left (\int x \left (a+b \tan ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}-\frac{(b e) \operatorname{Subst}\left (\int \frac{x^2 \left (a+b \tan ^{-1}(x)\right )}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}-\frac{(b e) \operatorname{Subst}\left (\int \left (a+b \tan ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}+\frac{(b e) \operatorname{Subst}\left (\int \frac{a+b \tan ^{-1}(x)}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=-a b e x+\frac{e \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}-\frac{\left (b^2 e\right ) \operatorname{Subst}\left (\int \tan ^{-1}(x) \, dx,x,c+d x\right )}{d}\\ &=-a b e x-\frac{b^2 e (c+d x) \tan ^{-1}(c+d x)}{d}+\frac{e \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{\left (b^2 e\right ) \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=-a b e x-\frac{b^2 e (c+d x) \tan ^{-1}(c+d x)}{d}+\frac{e \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{e (c+d x)^2 \left (a+b \tan ^{-1}(c+d x)\right )^2}{2 d}+\frac{b^2 e \log \left (1+(c+d x)^2\right )}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0576755, size = 107, normalized size = 1.13 \[ \frac{e \left (2 b \tan ^{-1}(c+d x) \left (a \left (c^2+2 c d x+d^2 x^2+1\right )-b (c+d x)\right )+a (c+d x) (a c+a d x-2 b)+b^2 \left (c^2+2 c d x+d^2 x^2+1\right ) \tan ^{-1}(c+d x)^2+b^2 \log \left ((c+d x)^2+1\right )\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.046, size = 220, normalized size = 2.3 \begin{align*}{\frac{{a}^{2}{x}^{2}de}{2}}+x{a}^{2}ce+{\frac{{a}^{2}{c}^{2}e}{2\,d}}+{\frac{d \left ( \arctan \left ( dx+c \right ) \right ) ^{2}{x}^{2}{b}^{2}e}{2}}+ \left ( \arctan \left ( dx+c \right ) \right ) ^{2}x{b}^{2}ce+{\frac{ \left ( \arctan \left ( dx+c \right ) \right ) ^{2}{b}^{2}{c}^{2}e}{2\,d}}+{\frac{e{b}^{2} \left ( \arctan \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-\arctan \left ( dx+c \right ) x{b}^{2}e-{\frac{\arctan \left ( dx+c \right ){b}^{2}ce}{d}}+{\frac{e{b}^{2}\ln \left ( 1+ \left ( dx+c \right ) ^{2} \right ) }{2\,d}}+d\arctan \left ( dx+c \right ){x}^{2}abe+2\,\arctan \left ( dx+c \right ) xabce+{\frac{\arctan \left ( dx+c \right ) ab{c}^{2}e}{d}}+{\frac{eab\arctan \left ( dx+c \right ) }{d}}-abex-{\frac{abce}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 5.20193, size = 294, normalized size = 3.09 \begin{align*} \frac{1}{2} \, a^{2} d e x^{2} +{\left (x^{2} \arctan \left (d x + c\right ) - d{\left (\frac{x}{d^{2}} + \frac{{\left (c^{2} - 1\right )} \arctan \left (\frac{d^{2} x + c d}{d}\right )}{d^{3}} - \frac{c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} a b d e + a^{2} c e x + \frac{{\left (2 \,{\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} a b c e}{d} + \frac{b^{2} e \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) +{\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x +{\left (b^{2} c^{2} + b^{2}\right )} e\right )} \arctan \left (d x + c\right )^{2} - 2 \,{\left (b^{2} d e x + b^{2} c e\right )} \arctan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.72326, size = 335, normalized size = 3.53 \begin{align*} \frac{a^{2} d^{2} e x^{2} + 2 \,{\left (a^{2} c - a b\right )} d e x + b^{2} e \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) +{\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x +{\left (b^{2} c^{2} + b^{2}\right )} e\right )} \arctan \left (d x + c\right )^{2} + 2 \,{\left (a b d^{2} e x^{2} +{\left (2 \, a b c - b^{2}\right )} d e x +{\left (a b c^{2} - b^{2} c + a b\right )} e\right )} \arctan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.04498, size = 240, normalized size = 2.53 \begin{align*} \begin{cases} a^{2} c e x + \frac{a^{2} d e x^{2}}{2} + \frac{a b c^{2} e \operatorname{atan}{\left (c + d x \right )}}{d} + 2 a b c e x \operatorname{atan}{\left (c + d x \right )} + a b d e x^{2} \operatorname{atan}{\left (c + d x \right )} - a b e x + \frac{a b e \operatorname{atan}{\left (c + d x \right )}}{d} + \frac{b^{2} c^{2} e \operatorname{atan}^{2}{\left (c + d x \right )}}{2 d} + b^{2} c e x \operatorname{atan}^{2}{\left (c + d x \right )} - \frac{b^{2} c e \operatorname{atan}{\left (c + d x \right )}}{d} + \frac{b^{2} d e x^{2} \operatorname{atan}^{2}{\left (c + d x \right )}}{2} - b^{2} e x \operatorname{atan}{\left (c + d x \right )} + \frac{b^{2} e \log{\left (\frac{c^{2}}{d^{2}} + \frac{2 c x}{d} + x^{2} + \frac{1}{d^{2}} \right )}}{2 d} + \frac{b^{2} e \operatorname{atan}^{2}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\c e x \left (a + b \operatorname{atan}{\left (c \right )}\right )^{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.23824, size = 294, normalized size = 3.09 \begin{align*} \frac{b^{2} d^{2} x^{2} \arctan \left (d x + c\right )^{2} e + 2 \, a b d^{2} x^{2} \arctan \left (d x + c\right ) e + 2 \, b^{2} c d x \arctan \left (d x + c\right )^{2} e + a^{2} d^{2} x^{2} e + 4 \, a b c d x \arctan \left (d x + c\right ) e + b^{2} c^{2} \arctan \left (d x + c\right )^{2} e + 2 \, a^{2} c d x e + 2 \, a b c^{2} \arctan \left (d x + c\right ) e - 2 \, b^{2} d x \arctan \left (d x + c\right ) e - 2 \, a b d x e - 2 \, b^{2} c \arctan \left (d x + c\right ) e + b^{2} \arctan \left (d x + c\right )^{2} e + 2 \, a b \arctan \left (d x + c\right ) e + b^{2} e \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]